#ifndef GRAPH_DB_SERVICE_H
#define GRAPH_DB_SERVICE_H
#include <grpcpp/grpcpp.h>
#include "../../generated/graph_service.grpc.pb.h"

using grpc::ServerContext;
using grpc::Status;
using namespace graph;

class GraphDbService final : public GraphService::Service {
    // --- 推荐查询接口 ---

    // 根据 List ID 获取相关子图
    Status GetSubgraphByListId(ServerContext* context, 
                              const GetSubgraphByListIdRequest* request,
                              GetSubgraphByListIdResponse* response) override;

    // 根据 User ID 获取相关子图
    Status GetSubgraphByUserId(ServerContext* context,
                              const GetSubgraphByUserIdRequest* request,
                              GetSubgraphByUserIdResponse* response) override;

    // 对外提供的间接调用neo4j驱动的接口函数
    Status Neo4jRun(ServerContext* context,
                               const Neo4jRunRequest* request,
                               Neo4jRunResponse* response) override;
};
#endif